<%@page import="web.lbsproject.processaudit.model.TaskExecutionFinishStatus4Web"%>
<%@page import="lbsproject.processaudit.model.WorkRegion"%>
<%@page import="lbsproject.processaudit.model.Worker"%>
<%@page import="web.lbsproject.processaudit.model.CheckTaskDefine4Web"%>
<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>巡检完成情况</title>
<link href="css/global.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
.item-t 
{
	font-weight: bold;
}
</style>
<script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery1.4.4.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/queryForm.js" charset="UTF-8"></script>
</head>
<body>
	<jsp:include page="WEB-INF/template/header.jsp">
		<jsp:param value="current" name="executeManage"/>
	</jsp:include>
	<div id="container" class="section">
		<div class="main">
			<form class="form" method="post" action="QueryTaskExecution">
				<!-- 以下hidden input指明查询类型 -->
				<input type="hidden" name="queryType" value="finishStatus"/>
				<jsp:include page="WEB-INF/template/executeManage/queryForm.jsp"/>
			</form>
				<h1 align="center">&nbsp;完成情况</h1 >&nbsp; 
				<%
				TaskExecutionFinishStatus4Web totalStatus = 
					(TaskExecutionFinishStatus4Web)request.getAttribute("taskFinishTotalStatus");
				if (totalStatus != null) {
				%>
				&nbsp;总任务数：<%=totalStatus.getTotalTaskCount()%> 
				&nbsp;完成数：<%=totalStatus.getFinishedTaskCount() %> 
				&nbsp;百分比：<%=totalStatus.getFinishedTaskPercent() %>%
				<%
				}
				%>
			<!-- show existed work regions -->
			<div>
				<table class="table">
					<thead>
						<tr>
							<th width="14%">日期</th>
							<th width="14%">任务数</th>
							<th width="12%">完成数</th>
							<th width="12%">完成情况</th>
							<th width="14%">操作</th>
						</tr>
					</thead>
					<tbody>
					<%
					@SuppressWarnings("unchecked")
					List<TaskExecutionFinishStatus4Web> finishStatuses =
						(List<TaskExecutionFinishStatus4Web>)request.getAttribute("taskFinishStatusByDay");
					if (finishStatuses != null) {
						for (TaskExecutionFinishStatus4Web s: finishStatuses) {	
					%>
						<tr>
							<td><%=s.getDay() %></td>
							<td><%=s.getTotalTaskCount() %></td>
							<td><%=s.getFinishedTaskCount() %></td>
							<td><%=s.getFinishedTaskPercent() %>%</td>
							<td>
								<a href="QueryTaskExecution?startDate=<%=s.getDay() %>&endDate=<%=s.getDay()%>&type=ALL">
								查看当日记录
								</a>
							</td>
						</tr>
					<%
						}
					}
					%>
					</tbody>
				</table>
			</div>
		</div>
		<div class="aside">
			<ul class="side-nav">
				<li class="nav-item "><a id="side-nav-1" class="nav-base" href="ShowTaskExecution?forwardPage=executionRecord"><b>执行记录</b><em></em></a></li>
				<li class="nav-item high-light"><a id="side-nav-1" class="nav-base" href=""><b>完成情况</b><em></em></a></li>
			</ul> 
		</div>
		<div class="clear"></div>
	</div>
	<jsp:include page="WEB-INF/template/footer.jsp"></jsp:include>
</body>
</html>